!function(){try{var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="60ca1b64-3ff6-40b0-b3d1-042d569e6988",e._sentryDebugIdIdentifier="sentry-dbid-60ca1b64-3ff6-40b0-b3d1-042d569e6988")}catch(e){}}();"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[859],{43762:(e,t,r)=>{let n;r.d(t,{z6:()=>T});var a=r(56788),i=r(36607),o=r(14232),l=r(33163),s=r(48774),u=r(13566),c=r(64671),d=r(47737),p=r(29842),f=r(29203),m=r(35308),g=r(59884),y=r(82153),h=r(64599),v=r(7784),k=r(85858),b=r(99289),C=r(62307),P=r(41612),O=r(96946),E=r(33890),w=r(22522),M=((n=M||{})[n.RegisterOption=0]="RegisterOption",n[n.UnregisterOption=1]="UnregisterOption",n);let R={0(e,t){let r=[...e.options,{id:t.id,element:t.element,propsRef:t.propsRef}];return{...e,options:(0,v.wl)(r,e=>e.element.current)}},1(e,t){let r=e.options.slice(),n=e.options.findIndex(e=>e.id===t.id);return -1===n?e:(r.splice(n,1),{...e,options:r})}},I=(0,o.createContext)(null);function L(e){let t=(0,o.useContext)(I);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,L),t}return t}I.displayName="RadioGroupDataContext";let A=(0,o.createContext)(null);function D(e){let t=(0,o.useContext)(A);if(null===t){let t=Error(`<${e} /> is missing a parent component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,D),t}return t}function S(e,t){return(0,b.Y)(t.type,R,e,t)}A.displayName="RadioGroupActionsContext";let T=Object.assign((0,P.FX)(function(e,t){let r=(0,o.useId)(),n=(0,m._)(),{id:a=`headlessui-radiogroup-${r}`,value:i,form:d,name:p,onChange:y,by:h,disabled:b=n||!1,defaultValue:M,...R}=e,L=(0,l.t)(h),[D,T]=(0,o.useReducer)(S,{options:[]}),F=D.options,[x,j]=(0,w.b0)(),[B,H]=(0,O.rU)(),U=(0,o.useRef)(null),V=(0,f.P)(U,t),G=(0,u.K)(M),[_,N]=(0,s.P)(i,y,G),Y=(0,o.useMemo)(()=>F.find(e=>!e.propsRef.current.disabled),[F]),Z=(0,o.useMemo)(()=>F.some(e=>L(e.propsRef.current.value,_)),[F,_]),X=(0,c._)(e=>{var t;if(b||L(e,_))return!1;let r=null==(t=F.find(t=>L(t.propsRef.current.value,e)))?void 0:t.propsRef.current;return(null==r||!r.disabled)&&(null==N||N(e),!0)}),W=(0,c._)(e=>{let t=U.current;if(!t)return;let r=(0,C.T)(t),n=F.filter(e=>!1===e.propsRef.current.disabled).map(e=>e.element.current);switch(e.key){case E.D.Enter:(0,k.q)(e.currentTarget);break;case E.D.ArrowLeft:case E.D.ArrowUp:if(e.preventDefault(),e.stopPropagation(),(0,v.CU)(n,v.BD.Previous|v.BD.WrapAround)===v.Me.Success){let e=F.find(e=>e.element.current===(null==r?void 0:r.activeElement));e&&X(e.propsRef.current.value)}break;case E.D.ArrowRight:case E.D.ArrowDown:if(e.preventDefault(),e.stopPropagation(),(0,v.CU)(n,v.BD.Next|v.BD.WrapAround)===v.Me.Success){let e=F.find(e=>e.element.current===(null==r?void 0:r.activeElement));e&&X(e.propsRef.current.value)}break;case E.D.Space:{e.preventDefault(),e.stopPropagation();let t=F.find(e=>e.element.current===(null==r?void 0:r.activeElement));t&&X(t.propsRef.current.value)}}}),q=(0,c._)(e=>(T({type:0,...e}),()=>T({type:1,id:e.id}))),$=(0,o.useMemo)(()=>({value:_,firstOption:Y,containsCheckedOption:Z,disabled:b,compare:L,...D}),[_,Y,Z,b,L,D]),z=(0,o.useMemo)(()=>({registerOption:q,change:X}),[q,X]),K=(0,o.useMemo)(()=>({value:_}),[_]),J=(0,o.useCallback)(()=>{if(void 0!==G)return X(G)},[X,G]),Q=(0,P.Ci)();return o.createElement(H,{name:"RadioGroup.Description"},o.createElement(j,{name:"RadioGroup.Label"},o.createElement(A.Provider,{value:z},o.createElement(I.Provider,{value:$},null!=p&&o.createElement(g.CL,{disabled:b,data:{[p]:_||"on"},overrides:{type:"radio",checked:null!=_},form:d,onReset:J}),Q({ourProps:{ref:V,id:a,role:"radiogroup","aria-labelledby":x,"aria-describedby":B,onKeyDown:W},theirProps:R,slot:K,defaultTag:"div",name:"RadioGroup"})))))}),{Option:(0,P.FX)(function(e,t){var r;let n=L("RadioGroup.Option"),l=D("RadioGroup.Option"),s=(0,o.useId)(),{id:u=`headlessui-radiogroup-option-${s}`,value:m,disabled:g=n.disabled||!1,autoFocus:y=!1,...v}=e,k=(0,o.useRef)(null),b=(0,f.P)(k,t),[C,E]=(0,w.b0)(),[M,R]=(0,O.rU)(),I=(0,p.Y)({value:m,disabled:g});(0,d.s)(()=>l.registerOption({id:u,element:k,propsRef:I}),[u,l,k,I]);let A=(0,c._)(e=>{var t;if((0,h.l)(e.currentTarget))return e.preventDefault();l.change(m)&&(null==(t=k.current)||t.focus())}),S=(null==(r=n.firstOption)?void 0:r.id)===u,{isFocusVisible:T,focusProps:F}=(0,a.o)({autoFocus:y}),{isHovered:x,hoverProps:j}=(0,i.M)({isDisabled:g}),B=n.compare(n.value,m),H=(0,P.v6)({ref:b,id:u,role:"radio","aria-checked":B?"true":"false","aria-labelledby":C,"aria-describedby":M,"aria-disabled":!!g||void 0,tabIndex:g?-1:B||!n.containsCheckedOption&&S?0:-1,onClick:g?void 0:A,autoFocus:y},F,j),U=(0,o.useMemo)(()=>({checked:B,disabled:g,active:T,hover:x,focus:T,autofocus:y}),[B,g,x,T,y]),V=(0,P.Ci)();return o.createElement(R,{name:"RadioGroup.Description"},o.createElement(E,{name:"RadioGroup.Label"},V({ourProps:H,theirProps:v,slot:U,defaultTag:"div",name:"RadioGroup.Option"})))}),Radio:(0,P.FX)(function(e,t){var r;let n=L("Radio"),l=D("Radio"),s=(0,o.useId)(),u=(0,y.q)(),g=(0,m._)(),{id:v=u||`headlessui-radio-${s}`,value:k,disabled:b=n.disabled||g||!1,autoFocus:C=!1,...E}=e,M=(0,o.useRef)(null),R=(0,f.P)(M,t),I=(0,w.o2)(),A=(0,O.MM)(),S=(0,p.Y)({value:k,disabled:b});(0,d.s)(()=>l.registerOption({id:v,element:M,propsRef:S}),[v,l,M,S]);let T=(0,c._)(e=>{var t;if((0,h.l)(e.currentTarget))return e.preventDefault();l.change(k)&&(null==(t=M.current)||t.focus())}),{isFocusVisible:F,focusProps:x}=(0,a.o)({autoFocus:C}),{isHovered:j,hoverProps:B}=(0,i.M)({isDisabled:b}),H=(null==(r=n.firstOption)?void 0:r.id)===v,U=n.compare(n.value,k),V=(0,P.v6)({ref:R,id:v,role:"radio","aria-checked":U?"true":"false","aria-labelledby":I,"aria-describedby":A,"aria-disabled":!!b||void 0,tabIndex:b?-1:U||!n.containsCheckedOption&&H?0:-1,autoFocus:C,onClick:b?void 0:T},x,B),G=(0,o.useMemo)(()=>({checked:U,disabled:b,hover:j,focus:F,autofocus:C}),[U,b,j,F,C]);return(0,P.Ci)()({ourProps:V,theirProps:E,slot:G,defaultTag:"span",name:"Radio"})}),Label:w.JU,Description:O.VY})},74672:(e,t,r)=>{let n,a,i,o,l,s;r.d(t,{T5:()=>A,YH:()=>T,pH:()=>S});var u=r(37876),c=r(14232),d=r(98477),p="u">typeof globalThis?globalThis:"u">typeof window?window:"u">typeof global?global:"u">typeof self?self:{},f="object"==typeof p&&p&&p.Object===Object&&p,m="object"==typeof self&&self&&self.Object===Object&&self;f||m||Function("return this")();var g="u">typeof window?c.useLayoutEffect:c.useEffect,y=typeof window>"u";let h=c.createContext(null),v=null;var k=((n=k||{})[n.Light=0]="Light",n[n.Dark=1]="Dark",n[n.Auto=2]="Auto",n),b=((a=b||{})[a.Standard=0]="Standard",a[a.MutedStandard=1]="MutedStandard",a[a.Hybrid=2]="Hybrid",a[a.Satellite=3]="Satellite",a),C=((i=C||{})[i.Adaptive=0]="Adaptive",i[i.Metric=1]="Metric",i[i.Imperial=2]="Imperial",i),P=((o=P||{})[o.LandCover=0]="LandCover",o[o.PointsOfInterest=1]="PointsOfInterest",o[o.None=2]="None",o);function O(e){if("number"==typeof e){if(e<0||e>1e3)throw RangeError("Display priority is out of range (0 to 1000)");return e}switch(e){case"low":return mapkit.Annotation.DisplayPriority.Low;case"high":return mapkit.Annotation.DisplayPriority.High;case"required":return mapkit.Annotation.DisplayPriority.Required;default:throw RangeError("Invalid display priority")}}var E=((l=E||{})[l.Hidden=0]="Hidden",l[l.Visible=1]="Visible",l[l.Adaptive=2]="Adaptive",l);function w(e){switch(e){case 2:return mapkit.FeatureVisibility.Adaptive;case 1:return mapkit.FeatureVisibility.Visible;case 0:return mapkit.FeatureVisibility.Hidden;default:throw RangeError("Invalid feature visibility")}}var M=((s=M||{})[s.Airport=0]="Airport",s[s.AmusementPark=1]="AmusementPark",s[s.Aquarium=2]="Aquarium",s[s.ATM=3]="ATM",s[s.Bakery=4]="Bakery",s[s.Bank=5]="Bank",s[s.Beach=6]="Beach",s[s.Brewery=7]="Brewery",s[s.Cafe=8]="Cafe",s[s.Campground=9]="Campground",s[s.CarRental=10]="CarRental",s[s.EVCharger=11]="EVCharger",s[s.FireStation=12]="FireStation",s[s.FitnessCenter=13]="FitnessCenter",s[s.FoodMarket=14]="FoodMarket",s[s.GasStation=15]="GasStation",s[s.Hospital=16]="Hospital",s[s.Hotel=17]="Hotel",s[s.Laundry=18]="Laundry",s[s.Library=19]="Library",s[s.Marina=20]="Marina",s[s.MovieTheater=21]="MovieTheater",s[s.Museum=22]="Museum",s[s.NationalPark=23]="NationalPark",s[s.Nightlife=24]="Nightlife",s[s.Park=25]="Park",s[s.Parking=26]="Parking",s[s.Pharmacy=27]="Pharmacy",s[s.Police=28]="Police",s[s.PostOffice=29]="PostOffice",s[s.PublicTransport=30]="PublicTransport",s[s.Restaurant=31]="Restaurant",s[s.Restroom=32]="Restroom",s[s.School=33]="School",s[s.Stadium=34]="Stadium",s[s.Store=35]="Store",s[s.Theater=36]="Theater",s[s.University=37]="University",s[s.Winery=38]="Winery",s[s.Zoo=39]="Zoo",s);function R(e){switch(e){case 0:return mapkit.PointOfInterestCategory.Airport;case 1:return mapkit.PointOfInterestCategory.AmusementPark;case 2:return mapkit.PointOfInterestCategory.Aquarium;case 3:return mapkit.PointOfInterestCategory.ATM;case 4:return mapkit.PointOfInterestCategory.Bakery;case 5:return mapkit.PointOfInterestCategory.Bank;case 6:return mapkit.PointOfInterestCategory.Beach;case 7:return mapkit.PointOfInterestCategory.Brewery;case 8:return mapkit.PointOfInterestCategory.Cafe;case 9:return mapkit.PointOfInterestCategory.Campground;case 10:return mapkit.PointOfInterestCategory.CarRental;case 11:return mapkit.PointOfInterestCategory.EVCharger;case 12:return mapkit.PointOfInterestCategory.FireStation;case 13:return mapkit.PointOfInterestCategory.FitnessCenter;case 14:return mapkit.PointOfInterestCategory.FoodMarket;case 15:return mapkit.PointOfInterestCategory.GasStation;case 16:return mapkit.PointOfInterestCategory.Hospital;case 17:return mapkit.PointOfInterestCategory.Hotel;case 18:return mapkit.PointOfInterestCategory.Laundry;case 19:return mapkit.PointOfInterestCategory.Library;case 20:return mapkit.PointOfInterestCategory.Marina;case 21:return mapkit.PointOfInterestCategory.MovieTheater;case 22:return mapkit.PointOfInterestCategory.Museum;case 23:return mapkit.PointOfInterestCategory.NationalPark;case 24:return mapkit.PointOfInterestCategory.Nightlife;case 25:return mapkit.PointOfInterestCategory.Park;case 26:return mapkit.PointOfInterestCategory.Parking;case 27:return mapkit.PointOfInterestCategory.Pharmacy;case 28:return mapkit.PointOfInterestCategory.Police;case 29:return mapkit.PointOfInterestCategory.PostOffice;case 30:return mapkit.PointOfInterestCategory.PublicTransport;case 31:return mapkit.PointOfInterestCategory.Restaurant;case 32:return mapkit.PointOfInterestCategory.Restroom;case 33:return mapkit.PointOfInterestCategory.School;case 34:return mapkit.PointOfInterestCategory.Stadium;case 35:return mapkit.PointOfInterestCategory.Store;case 36:return mapkit.PointOfInterestCategory.Theater;case 37:return mapkit.PointOfInterestCategory.University;case 38:return mapkit.PointOfInterestCategory.Winery;case 39:return mapkit.PointOfInterestCategory.Zoo;default:throw RangeError("Invalid point of interest category")}}function I(e){return new mapkit.CoordinateRegion(new mapkit.Coordinate(e.centerLatitude,e.centerLongitude),new mapkit.CoordinateSpan(e.latitudeDelta,e.longitudeDelta))}function L(e,t,r,n){(0,c.useEffect)(()=>{if(!e||!r)return;let a=e=>{r(n(e))};return e.addEventListener(t,a),()=>e.removeEventListener(t,a)},[e,r])}let A=c.forwardRef(({children:e,load:t,token:r,colorScheme:n=k.Light,mapType:a=b.Standard,distances:i=C.Adaptive,loadPriority:o=P.LandCover,isRotationEnabled:l=!0,isScrollEnabled:s=!0,isZoomEnabled:d=!0,showsCompass:p=E.Adaptive,showsScale:f=E.Hidden,showsMapTypeControl:m=!0,showsZoomControl:O=!0,showsUserLocationControl:M=!1,showsPointsOfInterest:A=!0,showsUserLocation:D=!1,tracksUserLocation:S=!1,allowWheelToZoom:T=!1,includedPOICategories:F,excludedPOICategories:x,paddingTop:j=0,paddingRight:B=0,paddingBottom:H=0,paddingLeft:U=0,initialRegion:V,cameraBoundary:G,minCameraDistance:_=0,maxCameraDistance:N=1/0,onLoad:Y,onRegionChangeStart:Z,onRegionChangeEnd:X,onMapTypeChange:W,onSingleTap:q,onDoubleTap:$,onLongPress:z,onUserLocationChange:K,onUserLocationError:J,onClick:Q,onMouseMove:ee,onMouseDown:et,onMouseUp:er},en)=>{let[ea,ei]=(0,c.useState)(null),eo=(0,c.useRef)(null),el=(0,c.useRef)(!1);(0,c.useEffect)(()=>(("function"==typeof t?t:function(e){return null!==v||(v=new Promise(t=>{let r=document.createElement("script");r.addEventListener("load",()=>{mapkit.init({authorizationCallback:t=>t(e)}),t()},{once:!0}),r.src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js",r.crossOrigin="anonymous",document.head.appendChild(r)})),v})(r).then(()=>{if(el.current)return;let e=V?{region:I(V)}:{};ei(new mapkit.Map(eo.current,e)),el.current=!0}),()=>{ea&&(ea.destroy(),el.current=!1)}),[]),(0,c.useEffect)(()=>{null!==ea&&(null==Y||Y())},[ea]),(0,c.useImperativeHandle)(en,()=>ea,[ea]);let es=function(e,{defaultValue:t=!1,initializeWithValue:r=!0}={}){let n=e=>y?t:window.matchMedia(e).matches,[a,i]=(0,c.useState)(()=>r?n(e):t);function o(){i(n(e))}return g(()=>{let t=window.matchMedia(e);return o(),t.addListener?t.addListener(o):t.addEventListener("change",o),()=>{t.removeListener?t.removeListener(o):t.removeEventListener("change",o)}},[e]),a}("(prefers-color-scheme: dark)");(0,c.useEffect)(()=>{ea&&(ea.colorScheme=function(e,t){switch(e){case 1:return mapkit.Map.ColorSchemes.Dark;case 0:return mapkit.Map.ColorSchemes.Light;case 2:return t?mapkit.Map.ColorSchemes.Dark:mapkit.Map.ColorSchemes.Light;default:throw RangeError("Invalid color scheme")}}(n,es))},[ea,n,es]),(0,c.useEffect)(()=>{ea&&(ea.mapType=function(e){switch(e){case 0:return mapkit.Map.MapTypes.Standard;case 1:return mapkit.Map.MapTypes.MutedStandard;case 2:return mapkit.Map.MapTypes.Hybrid;case 3:return mapkit.Map.MapTypes.Satellite;default:throw RangeError("Invalid map type")}}(a))},[ea,a]),(0,c.useEffect)(()=>{ea&&(ea.distances=function(e){switch(e){case 0:return mapkit.Map.Distances.Adaptive;case 1:return mapkit.Map.Distances.Metric;case 2:return mapkit.Map.Distances.Imperial;default:throw RangeError("Invalid distances value")}}(i))},[ea,i]),(0,c.useEffect)(()=>{ea&&(ea.loadPriority=function(e){switch(e){case 0:return mapkit.Map.LoadPriorities.LandCover;case 1:return mapkit.Map.LoadPriorities.PointsOfInterest;case 2:return mapkit.Map.LoadPriorities.None;default:throw RangeError("Invalid load priority")}}(o))},[ea,o]),Object.entries({isRotationEnabled:l,isScrollEnabled:s,isZoomEnabled:d,showsMapTypeControl:m,showsZoomControl:O,showsUserLocationControl:M,showsPointsOfInterest:A,showsUserLocation:D,tracksUserLocation:S}).forEach(([e,t])=>{(0,c.useEffect)(()=>{ea&&(ea[e]=t)},[ea,t])}),Object.entries({showsCompass:p,showsScale:f}).forEach(([e,t])=>{(0,c.useEffect)(()=>{ea&&(ea[e]=w(t))},[ea,t])}),(0,c.useEffect)(()=>{if(ea)try{ea._allowWheelToZoom=T}catch{}},[ea,T]),(0,c.useEffect)(()=>{ea&&(ea.padding=new mapkit.Padding(j,B,H,U))},[ea,j,B,H,U]),(0,c.useEffect)(()=>{ea&&(ea.cameraBoundary=G?I(G):null)},[ea,G]),(0,c.useEffect)(()=>{ea&&(ea.cameraZoomRange=new mapkit.CameraZoomRange(_,N))},[ea,_,N]),(0,c.useEffect)(()=>{if(ea){if(F&&x)throw Error("Can’t specify both includedPOICategories and excludedPOICategories.");F?ea.pointOfInterestFilter=mapkit.PointOfInterestFilter.including(F.map(R)):x?ea.pointOfInterestFilter=mapkit.PointOfInterestFilter.excluding(x.map(R)):delete ea.pointOfInterestFilter}},[ea,F,x]);let eu=()=>{var e;return{centerLatitude:(e=ea.region).center.latitude,centerLongitude:e.center.longitude,latitudeDelta:e.span.latitudeDelta,longitudeDelta:e.span.longitudeDelta}};L(ea,"region-change-start",Z,eu),L(ea,"region-change-end",X,eu),L(ea,"map-type-change",W,()=>(function(e){switch(e){case mapkit.Map.MapTypes.Standard:return 0;case mapkit.Map.MapTypes.MutedStandard:return 1;case mapkit.Map.MapTypes.Hybrid:return 2;case mapkit.Map.MapTypes.Satellite:return 3;default:throw RangeError("Invalid map type")}})(ea.mapType));let ec=({domEvents:e,pointOnPage:t})=>({domEvents:e,pointOnPage:t,toCoordinates:()=>ea.convertPointOnPageToCoordinate(t)});return L(ea,"single-tap",q,ec),L(ea,"double-tap",$,ec),L(ea,"long-press",z,ec),L(ea,"user-location-change",K,({coordinate:{latitude:e,longitude:t},timestamp:r,floorLevel:n})=>({coordinate:{latitude:e,longitude:t},timestamp:r,floorLevel:n})),L(ea,"user-location-error",J,({code:e,message:t})=>({code:e,message:t})),[{name:"click",handler:Q},{name:"mousemove",handler:ee},{name:"mousedown",handler:et},{name:"mouseup",handler:er}].forEach(({name:e,handler:t})=>{(0,c.useEffect)(()=>{var r;if(!ea||!t)return;let n=e=>{t({domEvents:[e],pointOnPage:{x:e.pageX,y:e.pageY},toCoordinates(){let{latitude:t,longitude:r}=ea.convertPointOnPageToCoordinate(new DOMPoint(e.pageX,e.pageY));return{latitude:t,longitude:r}}})};return null==(r=eo.current)||r.addEventListener(e,n),()=>{var t;return null==(t=eo.current)?void 0:t.removeEventListener(e,n)}},[ea,t])}),(0,u.jsx)(c.StrictMode,{children:(0,u.jsx)("div",{style:{width:"100%",height:"100%"},ref:eo,children:(0,u.jsx)(h.Provider,{value:ea,children:e})})})}),D=c.forwardRef(({children:e,type:t="container"},r)=>(0,u.jsx)("div",{className:`mk-callout-${t}`,ref:r,children:e}));function S({latitude:e,longitude:t,title:r="",subtitle:n="",accessibilityLabel:a=null,subtitleVisibility:i=E.Adaptive,titleVisibility:o=E.Adaptive,clusteringIdentifier:l=null,displayPriority:s,collisionMode:p,color:f="#ff5b40",glyphColor:m="white",glyphText:g="",glyphImage:y=null,selectedGlyphImage:v=null,paddingTop:k=0,paddingRight:b=0,paddingBottom:C=0,paddingLeft:P=0,anchorOffsetX:M=0,anchorOffsetY:R=0,calloutElement:I,calloutContent:A,calloutLeftAccessory:T,calloutRightAccessory:F,calloutEnabled:x,calloutOffsetX:j=0,calloutOffsetY:B=0,selected:H=!1,animates:U=!0,appearanceAnimation:V="",visible:G=!0,draggable:_=!1,enabled:N=!0,onSelect:Y,onDeselect:Z,onDragStart:X,onDragEnd:W,onDragging:q}){let[$,z]=(0,c.useState)(null),K=(0,c.useContext)(h);(0,c.useEffect)(()=>{$&&($.subtitleVisibility=w(i))},[$,i]),(0,c.useEffect)(()=>{$&&($.titleVisibility=w(o))},[$,o]),(0,c.useEffect)(()=>{$&&($.padding=new mapkit.Padding(k,b,C,P))},[$,k,b,C,P]),(0,c.useEffect)(()=>{$&&($.anchorOffset=new DOMPoint(M,R))},[$,M,R]),(0,c.useEffect)(()=>{$&&($.calloutOffset=new DOMPoint(j,B))},[$,j,B]);let J=(0,c.useRef)(null),Q=(0,c.useRef)(null),ee=(0,c.useRef)(null),et=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{if(!$)return;let e={};return I&&null!==et.current&&(e.calloutElementForAnnotation=()=>et.current),T&&null!==J.current&&(e.calloutLeftAccessoryForAnnotation=()=>J.current),F&&null!==Q.current&&(e.calloutRightAccessoryForAnnotation=()=>Q.current),A&&null!==ee.current&&(e.calloutContentForAnnotation=()=>ee.current),Object.keys(e).length>0?$.callout=e:delete $.callout,()=>{delete $.callout}},[$,I,T,F,A,et.current,J.current,Q.current,ee.current]),(0,c.useEffect)(()=>{$&&("Circle"===p?$.collisionMode=mapkit.Annotation.CollisionMode.Circle:"Rectangle"===p?$.collisionMode=mapkit.Annotation.CollisionMode.Rectangle:delete $.collisionMode)},[$,p]),(0,c.useEffect)(()=>{if($){if(void 0===s)return void delete $.displayPriority;$.displayPriority=O(s)}},[$,s]),Object.entries({title:r,subtitle:n,accessibilityLabel:a,color:f,glyphColor:m,glyphText:g,glyphImage:y,selectedGlyphImage:v,clusteringIdentifier:l,selected:H,animates:U,appearanceAnimation:V,draggable:_,enabled:N,visible:G,calloutEnabled:x}).forEach(([e,t])=>{(0,c.useEffect)(()=>{if($){if(void 0===t)return void delete $[e];$[e]=t}},[$,t])});let er=()=>{};return[{name:"select",handler:Y},{name:"deselect",handler:Z},{name:"drag-start",handler:X}].forEach(({name:e,handler:t})=>{L($,e,t,er)}),L($,"drag-end",W,()=>({latitude:$.coordinate.latitude,longitude:$.coordinate.longitude})),L($,"dragging",q,e=>({latitude:e.coordinate.latitude,longitude:e.coordinate.longitude})),(0,c.useLayoutEffect)(()=>{if(null===K)return;let r=new mapkit.MarkerAnnotation(new mapkit.Coordinate(e,t));return K.addAnnotation(r),z(r),()=>{K.removeAnnotation(r)}},[K,e,t]),(0,d.createPortal)((0,u.jsxs)("div",{style:{display:"none"},children:[void 0!==A&&(0,u.jsx)(D,{ref:ee,type:"content",children:A}),void 0!==T&&(0,u.jsx)(D,{ref:J,type:"left",children:T}),void 0!==F&&(0,u.jsx)(D,{ref:Q,type:"right",children:F}),void 0!==I&&(0,u.jsx)(D,{ref:et,type:"container",children:I})]}),document.body)}function T({latitude:e,longitude:t,title:r="",subtitle:n="",accessibilityLabel:a=null,size:i,paddingTop:o=0,paddingRight:l=0,paddingBottom:s=0,paddingLeft:p=0,anchorOffsetX:f=0,anchorOffsetY:m=0,selected:g=!1,onSelect:y,onDeselect:v,onDragStart:k,onDragEnd:b,onDragging:C,animates:P=!0,appearanceAnimation:E="",visible:w=!0,clusteringIdentifier:M=null,displayPriority:R,collisionMode:I,calloutElement:A,calloutContent:S,calloutLeftAccessory:F,calloutRightAccessory:x,calloutEnabled:j,calloutOffsetX:B=0,calloutOffsetY:H=0,draggable:U=!1,enabled:V=!0,children:G}){let[_,N]=(0,c.useState)(null),Y=(0,c.useMemo)(()=>document.createElement("div"),[]),Z=(0,c.useContext)(h);(0,c.useEffect)(()=>{_&&(_.padding=new mapkit.Padding(o,l,s,p))},[_,o,l,s,p]),(0,c.useEffect)(()=>{_&&(_.anchorOffset=new DOMPoint(f,m))},[_,f,m]),(0,c.useEffect)(()=>{_&&(_.calloutOffset=new DOMPoint(B,H))},[_,B,H]);let X=(0,c.useRef)(null),W=(0,c.useRef)(null),q=(0,c.useRef)(null),$=(0,c.useRef)(null);(0,c.useLayoutEffect)(()=>{if(!_)return;let e={};return A&&null!==$.current&&(e.calloutElementForAnnotation=()=>$.current),F&&null!==X.current&&(e.calloutLeftAccessoryForAnnotation=()=>X.current),x&&null!==W.current&&(e.calloutRightAccessoryForAnnotation=()=>W.current),S&&null!==q.current&&(e.calloutContentForAnnotation=()=>q.current),Object.keys(e).length>0?_.callout=e:delete _.callout,()=>{delete _.callout}},[_,A,F,x,S,$.current,X.current,W.current,q.current]),(0,c.useEffect)(()=>{_&&("Circle"===I?_.collisionMode=mapkit.Annotation.CollisionMode.Circle:"Rectangle"===I?_.collisionMode=mapkit.Annotation.CollisionMode.Rectangle:delete _.collisionMode)},[_,I]),(0,c.useEffect)(()=>{if(_){if(void 0===R)return void delete _.displayPriority;_.displayPriority=O(R)}},[_,R]),Object.entries({title:r,subtitle:n,accessibilityLabel:a,size:i,selected:g,animates:P,appearanceAnimation:E,draggable:U,enabled:V,visible:w,clusteringIdentifier:M,calloutEnabled:j}).forEach(([e,t])=>{(0,c.useEffect)(()=>{if(_){if(void 0===t)return void delete _[e];_[e]=t}},[_,t])});let z=()=>{};return[{name:"select",handler:y},{name:"deselect",handler:v},{name:"drag-start",handler:k}].forEach(({name:e,handler:t})=>{L(_,e,t,z)}),L(_,"drag-end",b,()=>({latitude:_.coordinate.latitude,longitude:_.coordinate.longitude})),L(_,"dragging",C,e=>({latitude:e.coordinate.latitude,longitude:e.coordinate.longitude})),(0,c.useLayoutEffect)(()=>{if(null===Z)return;let r=new mapkit.Annotation(new mapkit.Coordinate(e,t),()=>Y);return Z.addAnnotation(r),N(r),()=>{Z.removeAnnotation(r)}},[Z,e,t]),(0,u.jsxs)(u.Fragment,{children:[(0,d.createPortal)((0,u.jsxs)("div",{style:{display:"none"},children:[void 0!==S&&(0,u.jsx)(D,{ref:q,type:"content",children:S}),void 0!==F&&(0,u.jsx)(D,{ref:X,type:"left",children:F}),void 0!==x&&(0,u.jsx)(D,{ref:W,type:"right",children:x}),void 0!==A&&(0,u.jsx)(D,{ref:$,type:"container",children:A})]}),document.body),(0,d.createPortal)(G,Y)]})}}}]);